from sklearn.datasets import load_iris
from sklearn import tree
from graphviz import Source

X, y = load_iris(return_X_y=True)
clf = tree.DecisionTreeClassifier()
clf = clf.fit(X, y)

graph = Source(tree.export_graphviz(clf, out_file=None))
graph.format = 'png'
graph.render("iris", view=True)